package ar.com.gep.soccer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ar.com.gep.soccer.exception.MatchBusinessException;
import ar.com.gep.soccer.exception.TeamBusinessException;
import ar.com.gep.soccer.facade.TournamentFacade;
import ar.com.gep.soccer.services.GameService;
import ar.com.gep.soccer.services.dto.GameDTO;

@Service
public class MatchServiceImpl implements GameService {

	@Autowired
	TournamentFacade facade;

	@Override
	public GameDTO getById(final Long id) throws MatchBusinessException {
		return facade.getMatch(id);
	}

	@Override
	public GameDTO save(final GameDTO dto) throws TeamBusinessException {
		return facade.saveMatch(dto);
	}

	@Override
	public GameDTO update(final GameDTO dto) throws TeamBusinessException {
		return facade.updateMatch(dto);
	}

}
